<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
 <script src="${path }/static/js/uploadPreview.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function () { 
    new uploadPreview({ UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow" });
}
  

</script>
</head>

<body>
	<h1>上传文件</h1>
	<!--   enctype(编码格式)必须为multipart/form-data  -->
	 <form method="post" action="${path}/back/form"
		enctype="multipart/form-data">
		<input type="text" name="name" /> <input type="file" id="up_img" name="file" /> <input
			id="button1" type="submit" value="上传" /> 
		
	</form> 
	  <div id="imgdiv"><img id="imgShow" width="50" height="50" alt="这里显示你的图片"/></div>
	
</body>
</html>